x86: fix hypercall continuation cancellation in XENMAPSPACE_gmfn_range compat wrapper
authorJan Beulich <jbeulich@suse.com>
Wed, 28 Nov 2012 09:02:26 +0000 (10:02 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 28 Nov 2012 09:02:26 +0000 (10:02 +0100)
commit79ea67d7a7f8aee357232680ca114e0d773b8a5e
treeac12e1ca96618b9e7381b7b90e8bd86d703eb4f0
parent03f22f0070f3a609e6ae07a47ca90e75c65e329a
x86: fix hypercall continuation cancellation in XENMAPSPACE_gmfn_range compat wrapper

When no continuation was established, there must also not be an attempt
to cancel it - hypercall_cancel_continuation(), in the non-HVM, non-
multicall case, adjusts the guest mode return address in a way assuming
that an earlier call hypercall_create_continuation() took place.

Once touching this code, also restructure it slightly to improve
readability and switch to using the more relaxed copy function (copying
from the same guest memory already validated the virtual address
range).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
xen/arch/x86/x86_64/compat/mm.c